#include <iostream>
#include <stack>

// Function to convert decimal number to binary using stack
void decimalToBinary(int decimalNum) {
    std::stack<int> binaryStack;

    while (decimalNum > 0) {
        int remainder = decimalNum % 2;
        binaryStack.push(remainder);
        decimalNum /= 2;
    }
    std::cout << "Binary representation of the decimal number: ";
    while (!binaryStack.empty()) {
        std::cout << binaryStack.top();
        binaryStack.pop();
    }
    std::cout << std::endl;
}

int main() {
    int decimalNumber = 57;
    std::cout << "Decimal number: " << decimalNumber << std::endl;
    decimalToBinary(decimalNumber);
   
    return 0;
}
